package com.momoauth.api_client.config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TopicRabbitConfig {

    @Bean
    public Queue createLoginLogQueue() {
        return new Queue("createLoginLogQueue",true);
    }

    @Bean
    DirectExchange createLoginLogExchange() {
        return new DirectExchange("createLoginLogExchange");
    }

    @Bean
    Binding createLoginLogBindingDirect() {
        return BindingBuilder.bind(createLoginLogQueue())
                .to(createLoginLogExchange())
                .with("createLoginLogRouting");
    }
}
